#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

void PrintDigit(int m)
{
	int pd = 0;
	for (pd = 1; pd <= m; pd++)
	{
		printf("%d", pd);
	}
	
	for (pd = m-1; pd >= 1; pd--)
	{
		printf("%d", pd);
	}

	printf("\n");
}

void PrintSpace(int m)
{
		printf(" ");
}

int main()
{
	int n = 0;
	scanf("%d", &n);

	int i = 0;
	int j = 0;
	for (i = 1; i <= n; i++)
	{
		for (j = 1; j <= n - i; j++)
			PrintSpace(i);
		PrintDigit(i);
	}

	for (i = n - 1; i >= 1; i--)
	{
		for (j = 1; j <= n - i; j++)
			PrintSpace(i);
		PrintDigit(i);
	}

	return 0;
}